package com.triple.interviewexpert.constant;

public interface RedisConstant {
    String USER_SIGN_IN_REDIS_KEY_PREFIX = "user:signins";

    String USER_ACCESS_REDIS_KEY_PREFIX = "user:access";

    static String getUserSignInRedisKey(int year, long userId) {
        return String.format("%s:%s:%s", USER_SIGN_IN_REDIS_KEY_PREFIX, year, userId);
    }

    static String getUserAccessRedisKeyPrefix(long loginUserId) {
        return String.format(USER_ACCESS_REDIS_KEY_PREFIX + ":%s", loginUserId);
    }
}
